package com.lmind;

import java.io.File;


public class FileInfo {
	
	private File file;
	
	public FileInfo(String fileName) {
		file = new File(fileName);
	}
	
	/**
	 * 获取文件的扩展名
	 * @return
	 */
	public String getExtension() {
		int index = file.getName().lastIndexOf('.');
		if (index == -1) {
			return "";
		}
		
		return file.getName().substring(index + 1);
	}
}
